for (var i = 0; i <= 1000000; i++) {
    process.stdout.write(i.toString());
}